<?php

namespace Payment\Common\SwThree\Data;


/**
 * Class BackFaceInfoData
 *
 *
 * @package Payment\Common\Sw\Data
 *
 */
class BackFaceInfoData extends SwBaseData
{
    public function getData()
    {
        $this->retData['package'] = [
            'authinfo' => $this->authinfo??'',//微信、支付宝人脸识别SDK调用凭证
            'channel_order_no' => $this->channel_order_no??'',//银行渠道订单号，微信支付时显示在支付成功页面的条码，可用作扫
        ];
        $this->retData['other'] = [
            'pay_type' => $this->pay_type,
            'merchant_no' => $this->merchant_no,
            'terminal_id' => $this->terminal_no,
            'terminal_trace'=> $this->trace_no,
            'terminal_time' => $this->terminal_time,
        ];

        if($this->pay_type == '010'){ //微信人脸识别返回有效时间，单位：秒
            $this->retData['package']['expires_in'] = $this->expires_in;
        }
        if($this->pay_type == '020'){ //支付宝ZimInitClientData
            $this->retData['package']['zim_init'] = $this->zim_init;
        }

        return parent::getData(); // TODO: Change the autogenerated stub
    }

    protected function buildData()
    {

    }

    protected function checkDataParam()
    {
        // 对于返回数据不做检查检查
    }
}
